package com.wn.potal.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author yellow Docter
 * @date 2022 -08-30
 * @desc
 */
@FeignClient(value = "user-service",fallback = UserFeignClientFallback.class)
public interface UserFeignClient {

    // 方法调用user 的服务提供者

    // url 方法名称、方法参数 返回结果和  服务提供者中一致
    @GetMapping("/user/{id}")
    public String findUserById(@PathVariable("id") Integer id);

}
